package eol;
import static org.junit.Assert.*;

import org.junit.Test;


public class Calls extends BasicTest {
    
    @Test
    public void testCalls0() {
        assertEquals( "closure" +newline+ "4.0" +newline,
        		go("let one := fun() 2.0 end fun ; one() + one() ;" ) ) ;
  
    }

    @Test
    public void testCalls1() {
        assertEquals( "closure" +newline+ "9.0" +newline,
        		go("let twice := fun(a) 2 * a end fun ; twice(4)+1 ; " ) ) ;
    }

    @Test
    public void testCalls2() {
        assertEquals( "closure" +newline+ "58.0" +newline,
        		go("let ss := fun(a, b) a*a + b*b end fun ; ss( 1+2, 3+4 ) ; " ) ) ;
    }
 }
